package cn.wolfcode.web.controller;

import cn.wolfcode.qo.JsonResult;
import cn.wolfcode.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class LoginController {
    @Autowired
    private IEmployeeService employeeService;

    @RequestMapping("/login")
    @ResponseBody
    public JsonResult login(String username, String password) {
        employeeService.login(username, password);
        return new JsonResult(true, "登陆成功");
    }
}
